require('@babel/register')
const path = require('path')
const { OTT } = require('./lib/ott.js')

const app = new OTT({
	controllerPath: path.resolve('./controller'),
	exceptionPath: path.resolve('./core/httpException.js'),
	middleWarePath: path.resolve('./middleware'),
	errorField: {
		data: null,
		message: null,
		success: false,
		code: null
	},
	successField: {
		data: null,
		success: true,
		code: 10200
	},
	loggerConfig: {
		categories: {
			default: { appenders: ['out', 'multi'], level: 'debug', enableCallStack: true }
		}
	}
})

module.exports = app
